package cn.easybuy.service.impl;

import java.sql.Connection;
import java.sql.SQLException;

import cn.easybuy.dao.Easybuy_product_detailDao;
import cn.easybuy.dao.impl.Easybuy_product_detailDaoimpl;
import cn.easybuy.entity.easybuy_product_detail;
import cn.easybuy.service.Easybuy_product_detailService;
import cn.easybuy.utils.DataSourceUtil;

public class Easybuy_product_detailServiceimpl implements Easybuy_product_detailService {

	@Override
	public easybuy_product_detail getProductIdDetail(int productId)
			throws SQLException {
		// TODO Auto-generated method stub
		Connection conn=null;
		try {
			conn=DataSourceUtil.getConnection();
			return new Easybuy_product_detailDaoimpl(conn).getProductIdDetail(productId);
		}catch(SQLException e){
			// TODO Auto-generated catch block
			e.printStackTrace();
			throw e;
		}finally{
			DataSourceUtil.closeAll(conn, null, null);
		}
	}

}
